<template>
    <el-button
      :disabled="isDisabled"
      type="primary"
      @click="handleClick"
      :icon="Edit"
    >
      点击按钮 ({{ count }})
    </el-button>
  </template>
  
  <script setup lang="ts">
  import { ref } from 'vue'
  import { Edit } from '@element-plus/icons-vue'
  
  // 响应式状态
  const count = ref(0)
  const isDisabled = ref(false)
  
  // 事件处理
  const handleClick = () => {
    count.value++
    isDisabled.value = count.value > 5
  }
  </script>